package com.aha.dataanalyzeandview.enums;

/******************************
 * Project:           data-analyze-and-view
 * FileName:          TrendEnum.java
 * ClassName:         TrendEnum
 * Time:              2020/8/17 23:10
 * Version:           1.00
 * Author:            努力就是魅力
 * Description:        报告类型
 ******************************/
public enum StockReportTypeEnum implements BaseEnum {

    /**
     * 报告类型
     */
    FIRST_QUARTER_REPORT(1, "一季报"),
    MID_YEAR_REPORT(2, "中报"),
    THIRD_QUARTER_REPORT(3, "三季报"),
    ANNUAL_REPORT(4, "年报");



    private int code;
    private String value;

    StockReportTypeEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getValue() {
        return this.value;
    }

    public static StockReportTypeEnum valueOf(int code) {
        switch (code) {
            case 1:
                return StockReportTypeEnum.FIRST_QUARTER_REPORT;
            case 2:
                return StockReportTypeEnum.MID_YEAR_REPORT;
            case 3:
                return StockReportTypeEnum.THIRD_QUARTER_REPORT;
            case 4:
                return StockReportTypeEnum.ANNUAL_REPORT;
            default:
                return null;
        }
    }


}

